package com.example.students.student.controller;


import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zjs
 * @since 2025-04-02
 */
@RestController
@RequestMapping("/student/FreeMarker template error (DEBUG mode; use RETHROW in production!):
An error has occurred when reading existing sub-variable "entityPath"; see cause exception! The type of the containing value was: extended_hash+string (com.baomidou.mybatisplus.generator.config.po.TableInfo wrapped into f.e.b.GenericObjectModel)

----
FTL stack trace ("~" means nesting-related):
	- Failed at: ${table.entityPath}  [in template "templates/controller.java.ftl" at line 28, column 170]
----

Java stack trace (for programmers):
----
freemarker.core._TemplateModelException: [... Exception message was already printed; see it above ...]
	at freemarker.ext.beans.BeanModel.get(BeanModel.java:224)
	at freemarker.ext.beans.BeanModel.get(BeanModel.java:155)
	at freemarker.ext.beans.GenericObjectModel.get(GenericObjectModel.java:64)
	at freemarker.core.Dot.evalOnHash(Dot.java:61)
	at freemarker.core.Dot._eval(Dot.java:52)
	at freemarker.core.Expression.eval(Expression.java:101)
	at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:104)
	at freemarker.core.DollarVariable.accept(DollarVariable.java:63)
	at freemarker.core.Environment.visit(Environment.java:344)
	at freemarker.core.Environment.visit(Environment.java:350)
	at freemarker.core.Environment.visit(Environment.java:350)
	at freemarker.core.Environment.process(Environment.java:323)
	at freemarker.template.Template.process(Template.java:383)
	at com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine.writer(FreemarkerTemplateEngine.java:52)
	at com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine.writerFile(AbstractTemplateEngine.java:137)
	at com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine.batchOutput(AbstractTemplateEngine.java:126)
	at com.baomidou.mybatisplus.generator.AutoGenerator.execute(AutoGenerator.java:106)
	at com.example.students.config.GeneratorCodeConfig.main(GeneratorCodeConfig.java:169)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:1634)
	at freemarker.ext.beans.BeanModel.invokeThroughDescriptor(BeanModel.java:298)
	at freemarker.ext.beans.BeanModel.get(BeanModel.java:191)
	... 17 more
Caused by: java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
	at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
	at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
	at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
	at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Preconditions.java:112)
	at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Preconditions.java:349)
	at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4950)
	at java.base/java.lang.String.substring(String.java:2912)
	at com.baomidou.mybatisplus.generator.config.po.TableInfo.getEntityPath(TableInfo.java:86)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	... 21 more
